package com.fresh.liangyi.model.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
public class Goods implements Serializable {
    private Integer id; //id
    private String title; //标题
    private String introduce; //商品详情
    private Double price; //价格
    private Double discount; //折扣 9折就0.9
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createDate; //创建时间
    private Integer salesVolume; //销量
    private Integer stock; //库存
    private String image; //图片资源路径
    private Integer categoryId; // 分类id
}
